home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 016a / bbox22.zip / BATBOX.DOC < prev    next >
Text File  |  1992-01-25  |  13KB  |  306 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.         
  8.         BATBOX.EXE 2.2
  9.         Copyright 1991 by Chuck Steenburgh
  10.         
  11.            People have been creating menus with batch files for
  12.         years.  Some of these are quite elaborate, others very crude.
  13.         BATBOX is something in between.  BATBOX will allow you to
  14.         display an attractive, colorful menu and will wait for
  15.         the user to make a selection.  It will then set an appro-
  16.         priate ERRORLEVEL value which can be used to determine sub-
  17.         sequent actions in your batch file.
  18.         
  19.         Usage:       BATBOX  menufile [/C] [/Dn] [/H] [/O] [/Q]         |
  20.         
  21.                   menufile        is the name of an ASCII text 
  22.                                   file which you create.  This
  23.                                   will contain the menu's title
  24.                                   and a list of options.
  25.                                   
  26.                   /C              Normally, the longest menu item  
  27.                                   is centered in the menu box and  
  28.                                   subsequent items are left-aligned
  29.                                   below it.  This switch will cause
  30.                                   each menu item to be centered in 
  31.                                   the menu box.
  32.                   
  33.                   /Dn             Date/time format.  Current valid      |
  34.                                   values for n are:                     |
  35.                                   
  36.                                        1   Display time using 12-hour   |
  37.                                            clock with AM/PM             |
  38.                                        -   Turn off date/clock display  |
  39.                                   
  40.                   /H              Generates help screen.
  41.         
  42.                   /O              Ordinal menu selection.  Instead
  43.                                   of returning an errorlevel based
  44.                                   on the hotkey, returns an error-
  45.                                   level based on the ordinal pos- 
  46.                                   ition of the selected menu item.
  47.                                   
  48.                   /Q              Quiet mode suppresses all sounds.
  49.                   
  50.            To create a menufile, use a text editor, word processor that 
  51.         can save ASCII files, or EDLIN.COM or EDIT.COM that come with 
  52.         DOS.  In a pinch, you can use the "copy con" command but this 
  53.         doesn't give you much in the way of an editing capability.
  54.         
  55.            The structure of the menufile is simple.  The first line
  56.         contains your menu's title, up to 60 characters.  If you
  57.         don't want a title, leave the line blank, without any spaces.
  58.         (Hint:  press RETURN immediately without doing anything else 
  59.         when you first begin editing your document.)  Each succes-
  60.         sive line contains a menu item, exactly as you want it to ap-
  61.  
  62.                                      Page 1
  63.  
  64.  
  65.  
  66.  
  67.  
  68.         pear on the screen.  Do NOT include any blank lines here or 
  69.         you will end up with blank lines in your menu!
  70.         
  71.            A few limitations:  each line can contain no more than 60
  72.         characters (if you need more than this to describe your menu
  73.         choices, maybe you need Microsoft Windows, a Macintosh, or 
  74.         something else with lots of pictures).  In addition, your menu
  75.         items (but NOT the menu title) should each begin with a dis-
  76.         tinct letter in order for the selection function to work pro-
  77.         perly.  The selection function for BATBOX is case-insensitive,
  78.         so if you begin one line with the letter 's' and the other
  79.         with the letter 'S', these are considered the same.  Up to
  80.         10 menu items are permitted in any one file.  
  81.         
  82.           When you type BATBOX on the command line followed by the
  83.         name of your menufile (they must both be in the current dir-
  84.         ectory), you will see a menu pop up in the middle of the
  85.         screen.  The title will appear at the top, with each of your
  86.         menu items (up to ten) appearing at double spaced-intervals
  87.         inside the menu box.  Each item will also be numbered from 1  
  88.         to 0 (the 10th item being numbered "0").  At the bottom of the
  89.         menu you will see a the message "Enter your menu choice: ".  
  90.         If you have a color monitor, you will notice that the first 
  91.         letter (the "hotkey") of each menu item appears in a different
  92.         color than the rest of the text.  The time and date will also 
  93.         be displayed at the top of the menu.                          
  94.         
  95.            Selecting a menu item is as simple as pressing the first
  96.         letter in the name of that item (the "hotkey") OR by pressing 
  97.         the number key that corresponds to that menu item.  BATBOX will
  98.         then exit, and return an errorlevel based on the hotkey.  See 
  99.         Appendix 1 for a list of legal first letters and the error-
  100.         levels that are returned by BATBOX.  If you select the /O op- 
  101.         tion, BATBOX will return the position of the selected menu item
  102.         via the errorlevel.  For example, if you select the 1st item on
  103.         the list and have specified /O, the errorlevel will be set to  
  104.         1.  If you select the 5th item, the errorlevel will be 5, and  
  105.         so on.  You can use the errorlevel value that is returned to   
  106.         branch to different parts of your batch file or to execute 
  107.         commands.  See the DEMO.BAT file for an example of one way to 
  108.         do this. (DEMO.BAT is part of the STUF??.ZIP archive which     
  109.         contains demonstration files for all of the STEENBURGH'S STUFF 
  110.         utilities).                                                    
  111.         
  112.            The errorlevel that is returned is affected only by the /O  
  113.         switch, and NOT by whether the item is selected via the hotkey 
  114.         or the item number.                                            
  115.         
  116.            If you press a key that is neither a valid hotkey or an item
  117.         number, BATBOX will sound a tone and you will be required to   
  118.         make another selection.                                        
  119.         
  120.            If you enter BATBOX alone on the command line without any    |
  121.         parameters, the help screen will be displayed.                  |
  122.  
  123.                                      Page 2
  124.  
  125.  
  126.  
  127.  
  128.  
  129.         
  130.         Customizing Colors                                              |
  131.         
  132.         Beginning with version 2.1, BATBOX users can customize their    |
  133.         menu's colors by using a small text file called BATBOX.CFG.     |
  134.         Using the color codes from Appendix 3 of STEENBURGH'S STUFF     |
  135.         documentation, enter a color value into a text file for the     |
  136.         following items, one entry per line:                            |
  137.         
  138.              Line # (BATBOX.CFG)      Controls       Valid Values       |
  139.              ===================      ========       ============       |
  140.                    1              Menu color            1-127           |
  141.                    2              Menu border type      1-4             |
  142.                    3              Menu shadow pattern   1-3             |
  143.                    4              Menu title color      1-255           |
  144.                    5              Menu interior color   1-127           |
  145.                    6              Menu item color       1-255           |
  146.                    7              Hot key color         1-255           |
  147.                    8              Item # color          1-255           |
  148.                    9              Prompt message color  1-255           |
  149.                   10              Date/time color       1-255           |
  150.         
  151.         See the enclosed file BATBOX.CFG for an example.                |
  152.         
  153.         
  154.         DISCLAIMER
  155.         
  156.            The programs described in this documentation are guaran-
  157.         teed to do absolutely nothing!  They have, however, in my exper-
  158.         ience performed essentially as described herein.  The author
  159.         will not be responsible for any loss or damages caused through
  160.         the use of these programs.  No warranty, express or implied,
  161.         is provided for this software's performance, merchantability,
  162.         or fitness for a particular purpose.
  163.         
  164.            All trademarks are property of their respective owners.
  165.         
  166.            The programs and documentation are Copyright 1991,1992 by 
  167.         Chuck Steenburgh.  You are encouraged to distribute these pro-
  168.         grams provided the following conditions are met:
  169.         
  170.            - all files contained in the archive or distribution disk
  171.              must be distributed together in UNMODIFIED form
  172.         
  173.            - you charge no more than a reasonable fee for copying or
  174.              subscription, and clearly indicate that payment of such
  175.              a fee does NOT grant ownership of the programs.
  176.         
  177.            This program is part of set of utilities known as STEEN-
  178.         BURGH'S STUFF (Mildly Useful Utilities).  The full set of
  179.         utilities includes the following programs:
  180.         
  181.              BATBOX:     Simple menu creation/input system
  182.              CLK:        Displays time on screen
  183.  
  184.                                      Page 3
  185.  
  186.  
  187.  
  188.  
  189.  
  190.              DOSVER:     Checks for DOS version currently running
  191.              FREEDISK:   Checks for available disk space
  192.              HOWMUCH:    Displays space occupied by a group of files
  193.              INPUT:      Simple prompt/input system
  194.              KLS:        Colorful screen-clearing utility
  195.              LAUNCHER:   File selection/execution system
  196.              MUSIC:      Plays transcribed sheet music on the PC
  197.              RAND:       Random number generator
  198.              SKIP:       Prints blank lines from batch files
  199.              SOUNDER:    Wide range of noise making options
  200.              WAITFOR:    Timed pauses 
  201.              WHENISIT:   Date/time telling utility
  202.              WRITE:      Colorful output anywhere on screen
  203.              XD:         Create/switch directories at the same time
  204.         
  205.            Payment of the $10 registration fee automatically registers
  206.         you for the full set.
  207.         
  208.            You may evaluate these programs for up to 30 days on a free
  209.         trial basis.  After 30 days, you should register your use of
  210.         these programs.  The registration fee is $10, payable to the
  211.         author at the address given below.  IMPORTANT NOTICE:  Effective
  212.         1 March 1992, the registration price for STEENBURGH'S STUFF will
  213.         increase to $20 with a $5 discount for payment by cash, check, 
  214.         or money order.  This price change will be implemented in con-
  215.         junction with the release of Version 2.0 of STEENBURGH'S STUFF.
  216.         
  217.            Let's be real: I don't plan to make alot of money this way.
  218.         Registration does have its advantages:
  219.         
  220.            - I am improving these programs all the time.  Registration
  221.              will get you IMMEDIATELY a disk with the latest version.
  222.              You will also get the next major release of the program
  223.              sent to you free of charge.
  224.         
  225.            - While I can't promise to include everyone's suggestions
  226.              in program updates, you can bet I'll listen to registered
  227.              users before any of you scrounges out there.
  228.         
  229.            - You will me feel all warm and fuzzy and appreciated, and
  230.              all that good stuff.
  231.         
  232.            - You will also get an evaluation copy of my text-file for-
  233.              matting program (used to produce the margins in this doc-
  234.              ument), and any other electronic creations I have decided
  235.              to unleash on a foolish, unsuspecting world.
  236.         
  237.            Send comments/registrations to:
  238.         
  239.                 Chuck Steenburgh
  240.                 304A North Main Street
  241.                 Lexington, VA 24450
  242.                 (703)464-5290
  243.                 
  244.  
  245.                                      Page 4
  246.  
  247.  
  248.  
  249.  
  250.  
  251.                 !!!VIRGINIA RESIDENTS ADD 4.5SALES TAX!!!
  252.         
  253.                 CIS 72330,1776 (I haunt the IBMSYS and IBMPRO forums)
  254.         
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.  
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.  
  272.  
  273.  
  274.  
  275.  
  276.  
  277.  
  278.  
  279.  
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.                                      Page 5